-- GENERATED SPELL FOR [Rocknar] --


function spell0_25514(pUnit, Event) --@Harden Skin,Self--
pUnit:FullCastSpellOnTarget(22693,pUnit)
pUnit:RegisterEvent('Sorts_25514', 10349, 1)
end

function spell1_25514(pUnit, Event) --@Ice Block,Self--
pUnit:FullCastSpellOnTarget(45776,pUnit)
pUnit:RegisterEvent('Sorts_25514', 571, 1)
end

function spell2_25514(pUnit, Event) --@Ice Spike,n/a--
pUnit:FullCastSpellOnTarget(50094,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25514', 2000, 1)
end

function Sorts_25514(pUnit, Event)
local choix_sorts_25514 = math.random(0, 2)
if choix_sorts_25514 == 0 then
pUnit:RegisterEvent('spell0_25514', 1, 1)
end
if choix_sorts_25514 == 1 then
pUnit:RegisterEvent('spell1_25514', 1, 1)
end
if choix_sorts_25514 == 2 then
pUnit:RegisterEvent('spell2_25514', 1, 1)
end
end

function mob25514_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25514', math.random(1500, 3000), 1)
end

function mob25514_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25514_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25514_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25514, 1, 'mob25514_Action')
RegisterUnitEvent(25514, 2, 'mob25514_Leave')
RegisterUnitEvent(25514, 3, 'mob25514_Kill')
RegisterUnitEvent(25514, 4, 'mob25514_Die')
